<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.74.1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>AIDL 安卓进程间通信/跨应用通信 | caijinglong的博客</title>
    <meta property="og:title" content="AIDL 安卓进程间通信/跨应用通信 - caijinglong的博客">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content="2016-12-06T10:45:55&#43;08:00">
        
        
    <meta property="article:modified_time" content="2016-12-06T10:45:55&#43;08:00">
        
    <meta name="Keywords" content="golang,go语言,flutter,caijinglong,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="AIDL 安卓进程间通信/跨应用通信">
        
    <meta name="author" content="caijinglong">
    <meta property="og:url" content="http://www.kikt.top/posts/android/android-aidl/">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/css/normalize.css">
    
        <link rel="stylesheet" href="/css/prism.css">
    
    <link rel="stylesheet" href="/css/style.css">
    <script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

    

   
    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>

    
    
</head>

<body>
<header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="http://www.kikt.top">
                        caijinglong的博客
                    </a>
                
                <p class="description">Android/Flutter开发者，对于golang/python/ios/java 均有所了解</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="" href="http://www.kikt.top">首页</a>
                    
                    <a  href="http://www.kikt.top/archives/" title="归档">归档</a>
                    
                    <a  href="http://www.kikt.top/contact/" title="接单">接单</a>
                    
                    <a  href="http://www.kikt.top/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title">AIDL 安卓进程间通信/跨应用通信</h1>
                        </header>
                        <date class="post-meta meta-date">
                            2016年12月6日
                        </date>
                        
                        <div class="post-meta meta-category">
                            |
                            
                                <a href="http://www.kikt.top/categories/android">android</a>
                            
                        </div>
                        
                        
                        <div class="post-meta">
                            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span> 阅读</span></span>
                        </div>
                        
                        <div class="post-content">
                            <h3 id="前言">前言</h3>
<p>最近出去面试找工作，被人问到 AIDL，我就回答这个东西我用过，也大概理解，Android 的进程间通信语言嘛<br>
人家不置可否，那我能咋着呢，毕竟没深入研究过，也没办法，咱只能回来奋发图强了</p>
<h3 id="写在前面">写在前面</h3>
<p>我以前就看过的一个博客，里面原理代码什么都有，写的水平肯定比我高</p>
<blockquote>
<p><a href="http://www.cnblogs.com/over140/archive/2011/03/08/1976890.html%20Android%E5%BC%80%E5%8F%91%E8%80%85%E6%8C%87%E5%8D%97%286%29%20%E2%80%94%E2%80%94%20AIDL">Android 开发者指南(6) —— AIDL</a></p>
</blockquote>
<h3 id="首先字面解释">首先字面解释</h3>
<p>A=Android
IDL=Interface definition language
意译就是 android 接口定义语言，马丹，完全看不明白
算了，就是 Android 官方给我们定义出来跨进程，甚至跨应用通信用的</p>
<h3 id="开发平台">开发平台</h3>
<p>Android Studio 2.2+Android 手机一部</p>
<h3 id="新建工程">新建工程</h3>
<p>这个就不说了，跳过
就是新建工程后再建一个 module 也是 android app，功能后面再说</p>
<h3 id="aidl-语法">aidl 语法</h3>
<p>这里请去看我写在前面，里面比较详细，或者自行 baidu/google，我也了解的不多</p>
<h3 id="代码示例">代码示例</h3>
<p>最关键的地方到了
<img src="https://gitee.com/kikt-blog/blog-image/raw/master/weibo/844036b9ly1fxtdylugw1j20h90lcwqj.jpg" alt="图片">
其实就是新建一个 aidl 文件</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#75715e">// IMyAidlInterface.aidl
</span><span style="color:#75715e"></span><span style="color:#f92672">package</span> com.kikt.aidl<span style="color:#f92672">;</span>

<span style="color:#75715e">// Declare any non-default types here with import statements
</span><span style="color:#75715e"></span>
<span style="color:#66d9ef">interface</span> <span style="color:#a6e22e">IMyAidlInterface</span> <span style="color:#f92672">{</span>

    <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">test</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> sum<span style="color:#f92672">,</span><span style="color:#66d9ef">int</span> sum2<span style="color:#f92672">);</span>
<span style="color:#f92672">}</span>

</code></pre></div><p>接着 make project，生成下 java 代码
找到生成的代码看下
我靠 好复杂，还是渣格式，这里格式化一下：</p>
<p>不想看完全代码的可以看下后面的结构图</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#75715e">/*
</span><span style="color:#75715e"> * This file is auto-generated.  DO NOT MODIFY.
</span><span style="color:#75715e"> * Original file: H:\\Git\\ASWorkSpace\\public\\AidlDemo\\app\\src\\main\\aidl\\com\\kikt\\aidl\\IMyAidlInterface.aidl
</span><span style="color:#75715e"> */</span>
<span style="color:#f92672">package</span> com.kikt.aidl<span style="color:#f92672">;</span>
<span style="color:#75715e">// Declare any non-default types here with import statements
</span><span style="color:#75715e"></span>
<span style="color:#66d9ef">public</span> <span style="color:#66d9ef">interface</span> <span style="color:#a6e22e">IMyAidlInterface</span> <span style="color:#66d9ef">extends</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IInterface</span> <span style="color:#f92672">{</span>
    <span style="color:#75715e">/**
</span><span style="color:#75715e">     * Local-side IPC implementation stub class.
</span><span style="color:#75715e">     */</span>
    <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">abstract</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">Stub</span> <span style="color:#66d9ef">extends</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Binder</span> <span style="color:#66d9ef">implements</span> com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span> <span style="color:#f92672">{</span>
        <span style="color:#66d9ef">private</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">final</span> java<span style="color:#f92672">.</span><span style="color:#a6e22e">lang</span><span style="color:#f92672">.</span><span style="color:#a6e22e">String</span> DESCRIPTOR <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;com.kikt.aidl.IMyAidlInterface&#34;</span><span style="color:#f92672">;</span>

        <span style="color:#75715e">/**
</span><span style="color:#75715e">         * Construct the stub at attach it to the interface.
</span><span style="color:#75715e">         */</span>
        <span style="color:#66d9ef">public</span> <span style="color:#a6e22e">Stub</span><span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">this</span><span style="color:#f92672">.</span><span style="color:#a6e22e">attachInterface</span><span style="color:#f92672">(</span><span style="color:#66d9ef">this</span><span style="color:#f92672">,</span> DESCRIPTOR<span style="color:#f92672">);</span>
        <span style="color:#f92672">}</span>

        <span style="color:#75715e">/**
</span><span style="color:#75715e">         * Cast an IBinder object into an com.kikt.aidl.IMyAidlInterface interface,
</span><span style="color:#75715e">         * generating a proxy if needed.
</span><span style="color:#75715e">         */</span>
        <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">static</span> com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span> <span style="color:#a6e22e">asInterface</span><span style="color:#f92672">(</span>android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IBinder</span> obj<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">if</span> <span style="color:#f92672">((</span>obj <span style="color:#f92672">==</span> <span style="color:#66d9ef">null</span><span style="color:#f92672">))</span> <span style="color:#f92672">{</span>
                <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">null</span><span style="color:#f92672">;</span>
            <span style="color:#f92672">}</span>
            android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IInterface</span> iin <span style="color:#f92672">=</span> obj<span style="color:#f92672">.</span><span style="color:#a6e22e">queryLocalInterface</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
            <span style="color:#66d9ef">if</span> <span style="color:#f92672">(((</span>iin <span style="color:#f92672">!=</span> <span style="color:#66d9ef">null</span><span style="color:#f92672">)</span> <span style="color:#f92672">&amp;&amp;</span> <span style="color:#f92672">(</span>iin <span style="color:#66d9ef">instanceof</span> com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span><span style="color:#f92672">)))</span> <span style="color:#f92672">{</span>
                <span style="color:#66d9ef">return</span> <span style="color:#f92672">((</span>com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span><span style="color:#f92672">)</span> iin<span style="color:#f92672">);</span>
            <span style="color:#f92672">}</span>
            <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">new</span> com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Stub</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Proxy</span><span style="color:#f92672">(</span>obj<span style="color:#f92672">);</span>
        <span style="color:#f92672">}</span>

        <span style="color:#a6e22e">@Override</span>
        <span style="color:#66d9ef">public</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IBinder</span> <span style="color:#a6e22e">asBinder</span><span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">this</span><span style="color:#f92672">;</span>
        <span style="color:#f92672">}</span>

        <span style="color:#a6e22e">@Override</span>
        <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">boolean</span> <span style="color:#a6e22e">onTransact</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> code<span style="color:#f92672">,</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span> data<span style="color:#f92672">,</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span> reply<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> flags<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span>
                android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">RemoteException</span> <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">switch</span> <span style="color:#f92672">(</span>code<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                <span style="color:#66d9ef">case</span> INTERFACE_TRANSACTION<span style="color:#f92672">:</span> <span style="color:#f92672">{</span>
                    reply<span style="color:#f92672">.</span><span style="color:#a6e22e">writeString</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
                    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">true</span><span style="color:#f92672">;</span>
                <span style="color:#f92672">}</span>
                <span style="color:#66d9ef">case</span> TRANSACTION_test<span style="color:#f92672">:</span> <span style="color:#f92672">{</span>
                    data<span style="color:#f92672">.</span><span style="color:#a6e22e">enforceInterface</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
                    <span style="color:#66d9ef">int</span> _arg0<span style="color:#f92672">;</span>
                    _arg0 <span style="color:#f92672">=</span> data<span style="color:#f92672">.</span><span style="color:#a6e22e">readInt</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">int</span> _arg1<span style="color:#f92672">;</span>
                    _arg1 <span style="color:#f92672">=</span> data<span style="color:#f92672">.</span><span style="color:#a6e22e">readInt</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">this</span><span style="color:#f92672">.</span><span style="color:#a6e22e">test</span><span style="color:#f92672">(</span>_arg0<span style="color:#f92672">,</span> _arg1<span style="color:#f92672">);</span>
                    reply<span style="color:#f92672">.</span><span style="color:#a6e22e">writeNoException</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">true</span><span style="color:#f92672">;</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>
            <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">super</span><span style="color:#f92672">.</span><span style="color:#a6e22e">onTransact</span><span style="color:#f92672">(</span>code<span style="color:#f92672">,</span> data<span style="color:#f92672">,</span> reply<span style="color:#f92672">,</span> flags<span style="color:#f92672">);</span>
        <span style="color:#f92672">}</span>

        <span style="color:#66d9ef">private</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">Proxy</span> <span style="color:#66d9ef">implements</span> com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span> <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">private</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IBinder</span> mRemote<span style="color:#f92672">;</span>

            Proxy<span style="color:#f92672">(</span>android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IBinder</span> remote<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                mRemote <span style="color:#f92672">=</span> remote<span style="color:#f92672">;</span>
            <span style="color:#f92672">}</span>

            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IBinder</span> <span style="color:#a6e22e">asBinder</span><span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
                <span style="color:#66d9ef">return</span> mRemote<span style="color:#f92672">;</span>
            <span style="color:#f92672">}</span>

            <span style="color:#66d9ef">public</span> java<span style="color:#f92672">.</span><span style="color:#a6e22e">lang</span><span style="color:#f92672">.</span><span style="color:#a6e22e">String</span> <span style="color:#a6e22e">getInterfaceDescriptor</span><span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
                <span style="color:#66d9ef">return</span> DESCRIPTOR<span style="color:#f92672">;</span>
            <span style="color:#f92672">}</span>

            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">test</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> sum<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> sum2<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">RemoteException</span> <span style="color:#f92672">{</span>
                android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span> _data <span style="color:#f92672">=</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span><span style="color:#f92672">.</span><span style="color:#a6e22e">obtain</span><span style="color:#f92672">();</span>
                android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span> _reply <span style="color:#f92672">=</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span><span style="color:#f92672">.</span><span style="color:#a6e22e">obtain</span><span style="color:#f92672">();</span>
                <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
                    _data<span style="color:#f92672">.</span><span style="color:#a6e22e">writeInterfaceToken</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
                    _data<span style="color:#f92672">.</span><span style="color:#a6e22e">writeInt</span><span style="color:#f92672">(</span>sum<span style="color:#f92672">);</span>
                    _data<span style="color:#f92672">.</span><span style="color:#a6e22e">writeInt</span><span style="color:#f92672">(</span>sum2<span style="color:#f92672">);</span>
                    mRemote<span style="color:#f92672">.</span><span style="color:#a6e22e">transact</span><span style="color:#f92672">(</span>Stub<span style="color:#f92672">.</span><span style="color:#a6e22e">TRANSACTION_test</span><span style="color:#f92672">,</span> _data<span style="color:#f92672">,</span> _reply<span style="color:#f92672">,</span> 0<span style="color:#f92672">);</span>
                    _reply<span style="color:#f92672">.</span><span style="color:#a6e22e">readException</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span> <span style="color:#66d9ef">finally</span> <span style="color:#f92672">{</span>
                    _reply<span style="color:#f92672">.</span><span style="color:#a6e22e">recycle</span><span style="color:#f92672">();</span>
                    _data<span style="color:#f92672">.</span><span style="color:#a6e22e">recycle</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>
        <span style="color:#f92672">}</span>

        <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">final</span> <span style="color:#66d9ef">int</span> TRANSACTION_test <span style="color:#f92672">=</span> <span style="color:#f92672">(</span>android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IBinder</span><span style="color:#f92672">.</span><span style="color:#a6e22e">FIRST_CALL_TRANSACTION</span> <span style="color:#f92672">+</span> 0<span style="color:#f92672">);</span>
    <span style="color:#f92672">}</span>

    <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">test</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> sum<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> sum2<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">RemoteException</span><span style="color:#f92672">;</span>
<span style="color:#f92672">}</span>

</code></pre></div><p><img src="https://gitee.com/kikt-blog/blog-image/raw/master/weibo/844036b9ly1fxte0r4wi1j20jk09j0wl.jpg" alt="图片"></p>
<p><img src="https://gitee.com/kikt-blog/blog-image/raw/master/weibo/844036b9ly1fxtdyxm2frj20jk09j42m.jpg" alt="图片"></p>
<p>这里生成了一个静态内部类 Stub
方法签名如下</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#66d9ef">public</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">abstract</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">Stub</span> <span style="color:#66d9ef">extends</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Binder</span> <span style="color:#66d9ef">implements</span> com<span style="color:#f92672">.</span><span style="color:#a6e22e">kikt</span><span style="color:#f92672">.</span><span style="color:#a6e22e">aidl</span><span style="color:#f92672">.</span><span style="color:#a6e22e">IMyAidlInterface</span>
</code></pre></div><p>这个类是抽象类 这里类本身实现了对应的接口 IMyAidlInterface，但没有实现我们在 aidl 中定义的方法 test(int,int)方法
这也代表了 test 方法需要我们自己来实现</p>
<p>另外方法继承了 android.os.Binder，看到这个的时候，我们就知道，这个应该用在什么地方了
对了，和 Service 必须实现的那个接口 onBind 的返回参数一样！</p>
<p>这里写个类继承下</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#f92672">package</span> com.kikt.aidldemo<span style="color:#f92672">;</span>

<span style="color:#f92672">import</span> android.app.Service<span style="color:#f92672">;</span>
<span style="color:#f92672">import</span> android.content.Intent<span style="color:#f92672">;</span>
<span style="color:#f92672">import</span> android.os.IBinder<span style="color:#f92672">;</span>
<span style="color:#f92672">import</span> android.os.RemoteException<span style="color:#f92672">;</span>
<span style="color:#f92672">import</span> android.util.Log<span style="color:#f92672">;</span>

<span style="color:#f92672">import</span> com.kikt.aidl.IMyAidlInterface<span style="color:#f92672">;</span>

<span style="color:#66d9ef">public</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MyService</span> <span style="color:#66d9ef">extends</span> Service <span style="color:#f92672">{</span>
    <span style="color:#66d9ef">private</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">final</span> String TAG <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;MyService&#34;</span><span style="color:#f92672">;</span>
    <span style="color:#66d9ef">public</span> <span style="color:#a6e22e">MyService</span><span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
    <span style="color:#f92672">}</span>

    <span style="color:#a6e22e">@Override</span>
    <span style="color:#66d9ef">public</span> IBinder <span style="color:#a6e22e">onBind</span><span style="color:#f92672">(</span>Intent intent<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
       <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">new</span> AidlEntity<span style="color:#f92672">();</span>
    <span style="color:#f92672">}</span>

    <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">AidlEntity</span> <span style="color:#66d9ef">extends</span> IMyAidlInterface<span style="color:#f92672">.</span><span style="color:#a6e22e">Stub</span><span style="color:#f92672">{</span>

        <span style="color:#a6e22e">@Override</span>
        <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">test</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> sum<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> sum2<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span> RemoteException <span style="color:#f92672">{</span>
            Log<span style="color:#f92672">.</span><span style="color:#a6e22e">d</span><span style="color:#f92672">(</span>TAG<span style="color:#f92672">,</span> <span style="color:#e6db74">&#34;test() called with: sum = [&#34;</span> <span style="color:#f92672">+</span> sum <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;], sum2 = [&#34;</span> <span style="color:#f92672">+</span> sum2 <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;]&#34;</span><span style="color:#f92672">);</span>
        <span style="color:#f92672">}</span>
    <span style="color:#f92672">}</span>
<span style="color:#f92672">}</span>

</code></pre></div><p>为了方便，直接写在 service 内部
这里只是简单的做一个日志输出，其他什么也没有干</p>
<h3 id="同应用调用">同应用调用</h3>
<p>这里是同应用调用</p>
<p>直接看核心代码</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">        bindService<span style="color:#f92672">(</span><span style="color:#66d9ef">new</span> Intent<span style="color:#f92672">(</span><span style="color:#66d9ef">this</span><span style="color:#f92672">,</span> MyService<span style="color:#f92672">.</span><span style="color:#a6e22e">class</span><span style="color:#f92672">),</span> <span style="color:#66d9ef">new</span> ServiceConnection<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceConnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">,</span> IBinder service<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                IMyAidlInterface test <span style="color:#f92672">=</span> IMyAidlInterface<span style="color:#f92672">.</span><span style="color:#a6e22e">Stub</span><span style="color:#f92672">.</span><span style="color:#a6e22e">asInterface</span><span style="color:#f92672">(</span>service<span style="color:#f92672">);</span>
                <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
                    test<span style="color:#f92672">.</span><span style="color:#a6e22e">test</span><span style="color:#f92672">(</span>1<span style="color:#f92672">,</span> 2<span style="color:#f92672">);</span>
                <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>RemoteException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                    e<span style="color:#f92672">.</span><span style="color:#a6e22e">printStackTrace</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>

            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceDisconnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>

            <span style="color:#f92672">}</span>
        <span style="color:#f92672">},</span> BIND_AUTO_CREATE<span style="color:#f92672">);</span>
</code></pre></div><p>这里就是一个按钮点击后 bindService，然后 connection 会接受到一个 IBinder 的实例，这个实例就是上面 service 的那个</p>
<p>当然还有一个写法，直接强转也不会报错</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">    bindService<span style="color:#f92672">(</span><span style="color:#66d9ef">new</span> Intent<span style="color:#f92672">(</span><span style="color:#66d9ef">this</span><span style="color:#f92672">,</span> MyService<span style="color:#f92672">.</span><span style="color:#a6e22e">class</span><span style="color:#f92672">),</span> <span style="color:#66d9ef">new</span> ServiceConnection<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceConnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">,</span> IBinder service<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
<span style="color:#75715e">//                IMyAidlInterface test = IMyAidlInterface.Stub.asInterface(service);
</span><span style="color:#75715e">//                try {
</span><span style="color:#75715e">//                    test.test(1, 2);
</span><span style="color:#75715e">//                } catch (RemoteException e) {
</span><span style="color:#75715e">//                    e.printStackTrace();
</span><span style="color:#75715e">//                }
</span><span style="color:#75715e"></span>                MyService<span style="color:#f92672">.</span><span style="color:#a6e22e">AidlEntity</span> service1 <span style="color:#f92672">=</span> <span style="color:#f92672">(</span>MyService<span style="color:#f92672">.</span><span style="color:#a6e22e">AidlEntity</span><span style="color:#f92672">)</span> service<span style="color:#f92672">;</span>
                <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
                    service1<span style="color:#f92672">.</span><span style="color:#a6e22e">test</span><span style="color:#f92672">(</span>4<span style="color:#f92672">,</span>5<span style="color:#f92672">);</span>
                <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>RemoteException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                    e<span style="color:#f92672">.</span><span style="color:#a6e22e">printStackTrace</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>

            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceDisconnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>

            <span style="color:#f92672">}</span>
        <span style="color:#f92672">},</span> BIND_AUTO_CREATE<span style="color:#f92672">);</span>
</code></pre></div><p>效果都是一样的，那么这个什么 aidl 还有个毛用啊，强转就好了</p>
<p>接着就是高潮了</p>
<h3 id="跨应用调用">跨应用调用</h3>
<p>没错，我个人认为最重要的也就是这点了，aidl 可以在不同应用中调用
比如我要做一个提供服务的应用，或者说是同公司的核心组件，而不希望别人知道我的具体实现
这时我直接丢给你我的 aidl 文件，告诉你包名和服务名称，你就去调就好了！</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">ComponentName componentName <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> ComponentName<span style="color:#f92672">(</span>
                <span style="color:#e6db74">&#34;com.kikt.aidldemo&#34;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#34;com.kikt.aidldemo.MyService&#34;</span><span style="color:#f92672">);</span>
        Intent intent <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> Intent<span style="color:#f92672">();</span>
        intent<span style="color:#f92672">.</span><span style="color:#a6e22e">setComponent</span><span style="color:#f92672">(</span>componentName<span style="color:#f92672">);</span>

        bindService<span style="color:#f92672">(</span>intent<span style="color:#f92672">,</span> <span style="color:#66d9ef">new</span> ServiceConnection<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceConnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">,</span> IBinder service<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                IMyAidlInterface iinterface <span style="color:#f92672">=</span> IMyAidlInterface<span style="color:#f92672">.</span><span style="color:#a6e22e">Stub</span><span style="color:#f92672">.</span><span style="color:#a6e22e">asInterface</span><span style="color:#f92672">(</span>service<span style="color:#f92672">);</span>
                <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
                    iinterface<span style="color:#f92672">.</span><span style="color:#a6e22e">test</span><span style="color:#f92672">(</span>10<span style="color:#f92672">,</span> 20<span style="color:#f92672">);</span>
                <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>RemoteException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                    e<span style="color:#f92672">.</span><span style="color:#a6e22e">printStackTrace</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>

            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceDisconnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>

            <span style="color:#f92672">}</span>
        <span style="color:#f92672">},</span> BIND_AUTO_CREATE<span style="color:#f92672">);</span>
</code></pre></div><p>这里和上面的代码看上去差不多，但是我和原来的不是一个应用，而是第二个应用
这里使用 test 方法时，可以看到提供服务的应用可以输出日志</p>
<p>而引申下
如果这里有一个算法，实现了两个参数间的计算，那么我们是不是可以得到计算结果呢，比如说一个加密方法，我不需要知道具体实现，只要调用就好了</p>
<p>aidl 修改如下：</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#75715e">// IMyAidlInterface.aidl
</span><span style="color:#75715e"></span><span style="color:#f92672">package</span> com.kikt.aidl<span style="color:#f92672">;</span>

<span style="color:#75715e">// Declare any non-default types here with import statements
</span><span style="color:#75715e"></span>
<span style="color:#66d9ef">interface</span> <span style="color:#a6e22e">IMyAidlInterface</span> <span style="color:#f92672">{</span>

    <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">test</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> sum<span style="color:#f92672">,</span><span style="color:#66d9ef">int</span> sum2<span style="color:#f92672">);</span>

    <span style="color:#66d9ef">int</span> <span style="color:#a6e22e">add</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> num<span style="color:#f92672">,</span><span style="color:#66d9ef">int</span> num2<span style="color:#f92672">);</span>
<span style="color:#f92672">}</span>

</code></pre></div><p>内部类实现修改</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"> <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">AidlEntity</span> <span style="color:#66d9ef">extends</span> IMyAidlInterface<span style="color:#f92672">.</span><span style="color:#a6e22e">Stub</span><span style="color:#f92672">{</span>

        <span style="color:#a6e22e">@Override</span>
        <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">test</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> sum<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> sum2<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span> RemoteException <span style="color:#f92672">{</span>
            Log<span style="color:#f92672">.</span><span style="color:#a6e22e">d</span><span style="color:#f92672">(</span>TAG<span style="color:#f92672">,</span> <span style="color:#e6db74">&#34;test() called with: sum = [&#34;</span> <span style="color:#f92672">+</span> sum <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;], sum2 = [&#34;</span> <span style="color:#f92672">+</span> sum2 <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;]&#34;</span><span style="color:#f92672">);</span>
        <span style="color:#f92672">}</span>

        <span style="color:#a6e22e">@Override</span>
        <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">int</span> <span style="color:#a6e22e">add</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> num<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> num2<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span> RemoteException <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">return</span> num <span style="color:#f92672">+</span> num2<span style="color:#f92672">;</span>
        <span style="color:#f92672">}</span>
    <span style="color:#f92672">}</span>
</code></pre></div><p>调用者应用的 bindService 中修改如下：</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">bindService<span style="color:#f92672">(</span>intent<span style="color:#f92672">,</span> <span style="color:#66d9ef">new</span> ServiceConnection<span style="color:#f92672">()</span> <span style="color:#f92672">{</span>
            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceConnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">,</span> IBinder service<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                IMyAidlInterface iinterface <span style="color:#f92672">=</span> IMyAidlInterface<span style="color:#f92672">.</span><span style="color:#a6e22e">Stub</span><span style="color:#f92672">.</span><span style="color:#a6e22e">asInterface</span><span style="color:#f92672">(</span>service<span style="color:#f92672">);</span>
                <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
                    iinterface<span style="color:#f92672">.</span><span style="color:#a6e22e">test</span><span style="color:#f92672">(</span>10<span style="color:#f92672">,</span> 20<span style="color:#f92672">);</span>
                <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>RemoteException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                    e<span style="color:#f92672">.</span><span style="color:#a6e22e">printStackTrace</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span>

                <span style="color:#66d9ef">try</span> <span style="color:#f92672">{</span>
                    <span style="color:#66d9ef">int</span> add <span style="color:#f92672">=</span> iinterface<span style="color:#f92672">.</span><span style="color:#a6e22e">add</span><span style="color:#f92672">(</span>1<span style="color:#f92672">,</span> 2<span style="color:#f92672">);</span>
                    Log<span style="color:#f92672">.</span><span style="color:#a6e22e">d</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;MainActivity&#34;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#34;add:&#34;</span> <span style="color:#f92672">+</span> add<span style="color:#f92672">);</span>
                <span style="color:#f92672">}</span> <span style="color:#66d9ef">catch</span> <span style="color:#f92672">(</span>RemoteException e<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                    e<span style="color:#f92672">.</span><span style="color:#a6e22e">printStackTrace</span><span style="color:#f92672">();</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>

            <span style="color:#a6e22e">@Override</span>
            <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">onServiceDisconnected</span><span style="color:#f92672">(</span>ComponentName name<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>

            <span style="color:#f92672">}</span>
        <span style="color:#f92672">},</span> BIND_AUTO_CREATE<span style="color:#f92672">);</span>
</code></pre></div><p>在第二个中点击可以看到日志输出
<img src="https://gitee.com/kikt-blog/blog-image/raw/master/weibo/844036b9ly1fxtdzw5jbjj20jh05xgmq.jpg" alt="图片"></p>
<h3 id="思维发散">思维发散</h3>
<p>其实 aidl 就像一个核心，模块化开发的时候，核心模块不用给你代码，只要你去 aidl 文件，和跨应用的调用方法即可，而你实现后续的业务逻辑，也算是一种解耦的方式吧</p>
<h3 id="高级原理">高级/原理</h3>
<p>再回到 Stub 的实现中，看下 onTransact 方法就可以看出，其实 aidl 是实现自 android 提供的序列化
通过约定的方式，将方法名的参数和返回值序列化后再通过约定的方式取出来，这样来实现进程间通信
当然具体的内部原理因为我对于 framework 层没有深入研究，传输的过程我不太了解</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">        <span style="color:#a6e22e">@Override</span>
        <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">boolean</span> <span style="color:#a6e22e">onTransact</span><span style="color:#f92672">(</span><span style="color:#66d9ef">int</span> code<span style="color:#f92672">,</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span> data<span style="color:#f92672">,</span> android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">Parcel</span> reply<span style="color:#f92672">,</span> <span style="color:#66d9ef">int</span> flags<span style="color:#f92672">)</span> <span style="color:#66d9ef">throws</span>
                android<span style="color:#f92672">.</span><span style="color:#a6e22e">os</span><span style="color:#f92672">.</span><span style="color:#a6e22e">RemoteException</span> <span style="color:#f92672">{</span>
            <span style="color:#66d9ef">switch</span> <span style="color:#f92672">(</span>code<span style="color:#f92672">)</span> <span style="color:#f92672">{</span>
                <span style="color:#66d9ef">case</span> INTERFACE_TRANSACTION<span style="color:#f92672">:</span> <span style="color:#f92672">{</span>
                    reply<span style="color:#f92672">.</span><span style="color:#a6e22e">writeString</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
                    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">true</span><span style="color:#f92672">;</span>
                <span style="color:#f92672">}</span>
                <span style="color:#66d9ef">case</span> TRANSACTION_test<span style="color:#f92672">:</span> <span style="color:#f92672">{</span>
                    data<span style="color:#f92672">.</span><span style="color:#a6e22e">enforceInterface</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
                    <span style="color:#66d9ef">int</span> _arg0<span style="color:#f92672">;</span>
                    _arg0 <span style="color:#f92672">=</span> data<span style="color:#f92672">.</span><span style="color:#a6e22e">readInt</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">int</span> _arg1<span style="color:#f92672">;</span>
                    _arg1 <span style="color:#f92672">=</span> data<span style="color:#f92672">.</span><span style="color:#a6e22e">readInt</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">this</span><span style="color:#f92672">.</span><span style="color:#a6e22e">test</span><span style="color:#f92672">(</span>_arg0<span style="color:#f92672">,</span> _arg1<span style="color:#f92672">);</span>
                    reply<span style="color:#f92672">.</span><span style="color:#a6e22e">writeNoException</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">true</span><span style="color:#f92672">;</span>
                <span style="color:#f92672">}</span>
                <span style="color:#66d9ef">case</span> TRANSACTION_add<span style="color:#f92672">:</span> <span style="color:#f92672">{</span>
                    data<span style="color:#f92672">.</span><span style="color:#a6e22e">enforceInterface</span><span style="color:#f92672">(</span>DESCRIPTOR<span style="color:#f92672">);</span>
                    <span style="color:#66d9ef">int</span> _arg0<span style="color:#f92672">;</span>
                    _arg0 <span style="color:#f92672">=</span> data<span style="color:#f92672">.</span><span style="color:#a6e22e">readInt</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">int</span> _arg1<span style="color:#f92672">;</span>
                    _arg1 <span style="color:#f92672">=</span> data<span style="color:#f92672">.</span><span style="color:#a6e22e">readInt</span><span style="color:#f92672">();</span>
                    <span style="color:#66d9ef">int</span> _result <span style="color:#f92672">=</span> <span style="color:#66d9ef">this</span><span style="color:#f92672">.</span><span style="color:#a6e22e">add</span><span style="color:#f92672">(</span>_arg0<span style="color:#f92672">,</span> _arg1<span style="color:#f92672">);</span>
                    reply<span style="color:#f92672">.</span><span style="color:#a6e22e">writeNoException</span><span style="color:#f92672">();</span>
                    reply<span style="color:#f92672">.</span><span style="color:#a6e22e">writeInt</span><span style="color:#f92672">(</span>_result<span style="color:#f92672">);</span>
                    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">true</span><span style="color:#f92672">;</span>
                <span style="color:#f92672">}</span>
            <span style="color:#f92672">}</span>
            <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">super</span><span style="color:#f92672">.</span><span style="color:#a6e22e">onTransact</span><span style="color:#f92672">(</span>code<span style="color:#f92672">,</span> data<span style="color:#f92672">,</span> reply<span style="color:#f92672">,</span> flags<span style="color:#f92672">);</span>
        <span style="color:#f92672">}</span>
</code></pre></div><h3 id="后记">后记</h3>
<p>其实 aidl 很方便也是一种跨应用的解决方案，非常实用，面试和工作中都应该用得到，后续如果有机会可以多使用下，就先写这么多吧，谢谢网上的 android 先驱者和大神们!!!<br>
遨游在 android 知识的海洋中不可自拔的博主</p>

                        </div>

                        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/posts/android/Android-Junit/">Android Studio 简单的JunitTest</a></li>
        
        <li><a href="/posts/android/android-studio-2-2-ndk-and-gradle-config/">Android Studio 2.2 ndk开发环境 gradle配置</a></li>
        
        <li><a href="/posts/android/butterknife8-1/">Butterknife8.4.0的一些问题</a></li>
        
        <li><a href="/posts/android/android-clipboard-manager/">Android剪切板的简单解析</a></li>
        
        <li><a href="/posts/android/retroift-simple-packaging/">Retroift简单二次封装</a></li>
        
    </ul>
</div>


                        <div class="post-meta meta-tags">
                            
                            <ul class="clearfix">
                                
                                <li><a href="http://www.kikt.top/tags/junit">junit</a></li>
                                
                                <li><a href="http://www.kikt.top/tags/aidl">aidl</a></li>
                                
                                <li><a href="http://www.kikt.top/tags/android">android</a></li>
                                
                            </ul>
                            
                        </div>
                    </article>
                    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "caijinglong/kikt-blog-comment"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
                </div>
            </div>
            <div id="secondary">
    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="http://www.kikt.top">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/posts/java/crack/crack1/" title="使用javassist,修改jar包方法实现">使用javassist,修改jar包方法实现</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/github/actions/create/" title="Github action 的开发到发布">Github action 的开发到发布</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/jenkins&#43;fastlane/" title="flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英">flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/go/compile-for-android/" title="编译 go 源码为 android 动态库(so)">编译 go 源码为 android 动态库(so)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-2/" title="Flutter FocusNode 焦点那点事-(二)">Flutter FocusNode 焦点那点事-(二)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-1/" title="Flutter FocusNode 焦点那点事-(一)">Flutter FocusNode 焦点那点事-(一)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/server/caddy/cros_for_local_dev/" title="用 Caddy 解决 web 开发中本地跨域的问题">用 Caddy 解决 web 开发中本地跨域的问题</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/route/navigator-helper2/" title="Navigator Helper2">Navigator Helper2</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/grey-app/" title="flutter 怎么实现app整体灰度">flutter 怎么实现app整体灰度</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/plugin/flutter-sdk-import-aar/" title="Flutter 插件开发之引入aar到安卓部分 并使用本地maven">Flutter 插件开发之引入aar到安卓部分 并使用本地maven</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">分类</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/categories/android/">android(25)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/caddy/">caddy(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/dart/">dart(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/docker/">docker(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/flutter/">flutter(60)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/github/">github(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/go/">go(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/golang/">golang(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/iOS/">iOS(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/ios/">ios(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/java/">java(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/jetbrains/">jetbrains(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/other/">other(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/python/">python(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/server/">server(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/spring/">spring(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/tools/">tools(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%9D%82%E9%A1%B9/">杂项(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%B6%82%E9%B8%A6/">涂鸦(1)</a>
    </li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title">标签</h3>
<div class="tagcloud">
    
    <a href="http://www.kikt.top/tags/10/">10</a>
    
    <a href="http://www.kikt.top/tags/2.3/">2.3</a>
    
    <a href="http://www.kikt.top/tags/Clipboard/">Clipboard</a>
    
    <a href="http://www.kikt.top/tags/Javassist/">Javassist</a>
    
    <a href="http://www.kikt.top/tags/Migrate/">Migrate</a>
    
    <a href="http://www.kikt.top/tags/aar/">aar</a>
    
    <a href="http://www.kikt.top/tags/actions/">actions</a>
    
    <a href="http://www.kikt.top/tags/aidl/">aidl</a>
    
    <a href="http://www.kikt.top/tags/android/">android</a>
    
    <a href="http://www.kikt.top/tags/androidQ/">androidQ</a>
    
    <a href="http://www.kikt.top/tags/androidX/">androidX</a>
    
    <a href="http://www.kikt.top/tags/apk/">apk</a>
    
    <a href="http://www.kikt.top/tags/app/">app</a>
    
    <a href="http://www.kikt.top/tags/appcode/">appcode</a>
    
    <a href="http://www.kikt.top/tags/azure/">azure</a>
    
    <a href="http://www.kikt.top/tags/ble/">ble</a>
    
    <a href="http://www.kikt.top/tags/bottomsheet/">bottomsheet</a>
    
    <a href="http://www.kikt.top/tags/butterknife/">butterknife</a>
    
    <a href="http://www.kikt.top/tags/c/">c</a>
    
    <a href="http://www.kikt.top/tags/caddy/">caddy</a>
    
    <a href="http://www.kikt.top/tags/camera/">camera</a>
    
    <a href="http://www.kikt.top/tags/cameraX/">cameraX</a>
    
    <a href="http://www.kikt.top/tags/channel/">channel</a>
    
    <a href="http://www.kikt.top/tags/cocoapods/">cocoapods</a>
    
    <a href="http://www.kikt.top/tags/cupertino/">cupertino</a>
    
    <a href="http://www.kikt.top/tags/dart/">dart</a>
    
    <a href="http://www.kikt.top/tags/dart-2.6/">dart-2.6</a>
    
    <a href="http://www.kikt.top/tags/desktop/">desktop</a>
    
    <a href="http://www.kikt.top/tags/dialog/">dialog</a>
    
    <a href="http://www.kikt.top/tags/dmg/">dmg</a>
    
    <a href="http://www.kikt.top/tags/doc/">doc</a>
    
    <a href="http://www.kikt.top/tags/docker/">docker</a>
    
    <a href="http://www.kikt.top/tags/docker-compose/">docker-compose</a>
    
    <a href="http://www.kikt.top/tags/excel/">excel</a>
    
    <a href="http://www.kikt.top/tags/exists/">exists</a>
    
    <a href="http://www.kikt.top/tags/faq/">faq</a>
    
    <a href="http://www.kikt.top/tags/fastlane/">fastlane</a>
    
    <a href="http://www.kikt.top/tags/ffi/">ffi</a>
    
    <a href="http://www.kikt.top/tags/ffmpeg/">ffmpeg</a>
    
    <a href="http://www.kikt.top/tags/flexmark/">flexmark</a>
    
    <a href="http://www.kikt.top/tags/flutter/">flutter</a>
    
    <a href="http://www.kikt.top/tags/flutter-web/">flutter-web</a>
    
    <a href="http://www.kikt.top/tags/focus/">focus</a>
    
    <a href="http://www.kikt.top/tags/focusNode/">focusNode</a>
    
    <a href="http://www.kikt.top/tags/form/">form</a>
    
    <a href="http://www.kikt.top/tags/framework/">framework</a>
    
    <a href="http://www.kikt.top/tags/github/">github</a>
    
    <a href="http://www.kikt.top/tags/go/">go</a>
    
    <a href="http://www.kikt.top/tags/golang/">golang</a>
    
    <a href="http://www.kikt.top/tags/gradle/">gradle</a>
    
    <a href="http://www.kikt.top/tags/http/">http</a>
    
    <a href="http://www.kikt.top/tags/iOS/">iOS</a>
    
    <a href="http://www.kikt.top/tags/ide/">ide</a>
    
    <a href="http://www.kikt.top/tags/idea/">idea</a>
    
    <a href="http://www.kikt.top/tags/index/">index</a>
    
    <a href="http://www.kikt.top/tags/inside/">inside</a>
    
    <a href="http://www.kikt.top/tags/ios/">ios</a>
    
    <a href="http://www.kikt.top/tags/java/">java</a>
    
    <a href="http://www.kikt.top/tags/jenkins/">jenkins</a>
    
    <a href="http://www.kikt.top/tags/jetbrains/">jetbrains</a>
    
    <a href="http://www.kikt.top/tags/jsdelivr/">jsdelivr</a>
    
    <a href="http://www.kikt.top/tags/json/">json</a>
    
    <a href="http://www.kikt.top/tags/json_serializable/">json_serializable</a>
    
    <a href="http://www.kikt.top/tags/junit/">junit</a>
    
    <a href="http://www.kikt.top/tags/library/">library</a>
    
    <a href="http://www.kikt.top/tags/live-template/">live-template</a>
    
    <a href="http://www.kikt.top/tags/loadmore/">loadmore</a>
    
    <a href="http://www.kikt.top/tags/log/">log</a>
    
    <a href="http://www.kikt.top/tags/mac/">mac</a>
    
    <a href="http://www.kikt.top/tags/macos/">macos</a>
    
    <a href="http://www.kikt.top/tags/maven/">maven</a>
    
    <a href="http://www.kikt.top/tags/mysql/">mysql</a>
    
    <a href="http://www.kikt.top/tags/navigationbar/">navigationbar</a>
    
    <a href="http://www.kikt.top/tags/navigator/">navigator</a>
    
    <a href="http://www.kikt.top/tags/ndk/">ndk</a>
    
    <a href="http://www.kikt.top/tags/nginx/">nginx</a>
    
    <a href="http://www.kikt.top/tags/oc/">oc</a>
    
    <a href="http://www.kikt.top/tags/opencv/">opencv</a>
    
    <a href="http://www.kikt.top/tags/poi/">poi</a>
    
    <a href="http://www.kikt.top/tags/pub/">pub</a>
    
    <a href="http://www.kikt.top/tags/python/">python</a>
    
    <a href="http://www.kikt.top/tags/retrofit/">retrofit</a>
    
    <a href="http://www.kikt.top/tags/route/">route</a>
    
    <a href="http://www.kikt.top/tags/server/">server</a>
    
    <a href="http://www.kikt.top/tags/so/">so</a>
    
    <a href="http://www.kikt.top/tags/spp/">spp</a>
    
    <a href="http://www.kikt.top/tags/sprintboot/">sprintboot</a>
    
    <a href="http://www.kikt.top/tags/swift/">swift</a>
    
    <a href="http://www.kikt.top/tags/tap/">tap</a>
    
    <a href="http://www.kikt.top/tags/thymeleaf/">thymeleaf</a>
    
    <a href="http://www.kikt.top/tags/tips/">tips</a>
    
    <a href="http://www.kikt.top/tags/toast/">toast</a>
    
    <a href="http://www.kikt.top/tags/transition/">transition</a>
    
    <a href="http://www.kikt.top/tags/ui/">ui</a>
    
    <a href="http://www.kikt.top/tags/utf8/">utf8</a>
    
    <a href="http://www.kikt.top/tags/yield/">yield</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%8C%E8%BF%9B%E5%88%B6/">二进制</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89/">交叉</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91/">交叉编译</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%8B%E7%BB%8D/">介绍</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83/">代码规范</a>
    
    <a href="http://www.kikt.top/tags/%E5%86%B2%E7%AA%81/">冲突</a>
    
    <a href="http://www.kikt.top/tags/%E5%8A%A8%E6%80%81/">动态</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%91%E5%B8%83/">发布</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%AF%E6%89%A7%E8%A1%8C/">可执行</a>
    
    <a href="http://www.kikt.top/tags/%E5%9B%BE%E5%BA%8A/">图床</a>
    
    <a href="http://www.kikt.top/tags/%E5%9F%8E%E5%B8%82/">城市</a>
    
    <a href="http://www.kikt.top/tags/%E5%A4%A7%E6%96%87%E4%BB%B6/">大文件</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%A5%E5%85%B7/">工具</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE/">已有项目</a>
    
    <a href="http://www.kikt.top/tags/%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/">开发环境</a>
    
    <a href="http://www.kikt.top/tags/%E6%80%BB%E7%BB%93/">总结</a>
    
    <a href="http://www.kikt.top/tags/%E6%85%A2/">慢</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%93%E5%8C%85/">打包</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%AB%E7%A0%81/">扫码</a>
    
    <a href="http://www.kikt.top/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="http://www.kikt.top/tags/%E6%96%87%E6%A1%A3/">文档</a>
    
    <a href="http://www.kikt.top/tags/%E6%A8%A1%E6%9D%BF/">模板</a>
    
    <a href="http://www.kikt.top/tags/%E6%B8%B2%E6%9F%93/">渲染</a>
    
    <a href="http://www.kikt.top/tags/%E6%BA%90%E7%A0%81%E8%A7%A3%E6%9E%90/">源码解析</a>
    
    <a href="http://www.kikt.top/tags/%E7%81%B0%E5%BA%A6/">灰度</a>
    
    <a href="http://www.kikt.top/tags/%E7%82%B9%E5%87%BB/">点击</a>
    
    <a href="http://www.kikt.top/tags/%E7%84%A6%E7%82%B9/">焦点</a>
    
    <a href="http://www.kikt.top/tags/%E7%88%AC%E8%99%AB/">爬虫</a>
    
    <a href="http://www.kikt.top/tags/%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86/">状态管理</a>
    
    <a href="http://www.kikt.top/tags/%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE/">百度地图</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A0%81/">编码</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A8%8B%E6%8A%80%E5%B7%A7/">编程技巧</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E8%AF%91/">编译</a>
    
    <a href="http://www.kikt.top/tags/%E7%BF%BB%E8%AF%91/">翻译</a>
    
    <a href="http://www.kikt.top/tags/%E8%93%9D%E7%89%99/">蓝牙</a>
    
    <a href="http://www.kikt.top/tags/%E8%A1%A8%E5%8D%95/">表单</a>
    
    <a href="http://www.kikt.top/tags/%E8%B7%AF%E7%94%B1/">路由</a>
    
    <a href="http://www.kikt.top/tags/%E8%BF%87%E5%9C%BA%E5%8A%A8%E7%94%BB/">过场动画</a>
    
    <a href="http://www.kikt.top/tags/%E9%9A%90%E7%A7%81/">隐私</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://github.com/Caijinglong" title="我的Github">我的Github</a>
        </li>
        
        <li>
            <a target="_blank" href="https://flutter.dev" title="flutter 官网">flutter 官网</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="http://www.kikt.top/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        <div>
            <p>如果我的blog对您有帮助,而您愿意捐赠 😆, 可以用下面的二维码</p>
            <img style="width:5rem;" src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141834.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141931.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424142013.png"/>
        </div>
        &copy; 2018 <a href="http://www.kikt.top">caijinglong的博客 By caijinglong</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="http://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/rujews/maupassant-hugo" target="_blank">maupassant</a>.<br/>
        本站所有内容基于<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" style="color:coral">CC4.0</a>协议发布,需要转载必须署名
        <br/>
        如果有问题可以<a href="mailto:cjl_spy@163.com">email联系我</a>
        <br/>
        京ICP备18038473号-1
        
    </div>
</footer>


    <script type="text/javascript" src="/js/prism.js" async="true"></script>
    <script type="text/javascript">
    
    (function(){
        $("pre code").parent().addClass("line-numbers")
    }())

    window.MathJax = {
        tex2jax: {
            inlineMath: [ ['$','$'] ],
            processEscapes: true
        }
    };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/js/totop.js?v=0.0.0" async=""></script>



<script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




</body>
</html>
